﻿@{
    ViewBag.Title = "Bản đồ thống kê KVHC";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<script type="text/javascript" src="http://viettelmap.vn/VTMapService/VTMapAPI?api=VTMap&type=main&k=dffc8675fc5d781ea8f0131f7d855565"></script>

<script type='text/javascript' src='~/Scripts/ThongkeMatdoDanSo.js'></script>
<link href="~/Content/Airview-master/master.css" rel="stylesheet">
<script src="~/Scripts/Airview-master/vendor/tooltip.min.js"></script>
<script src="~/Scripts/Airview-master/airview.min.js"></script>

<script src="@Url.Content("~/Scripts/jquery.maskedinput.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.core.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.widget.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.js")"></script>
<link href="@Url.Content("~/Content/jquery-ui.1.10.2.css")" rel="stylesheet" type="text/css" />

<link href="@Url.Content("~/Content/styleMap_navbar.css")" rel="stylesheet" type="text/css" />

<script>
    var strGetUnixDPC = '@Url.Action("GetUnixDPC", "Area")';
    var headers = {};

    $(document).ready(function () {
        var serviceUrl = null;
        var strCommuneCode = null;

        serviceUrl = '@ViewBag.ServiceUrl';
        strCommuneCode = '@ViewBag.CommuneCode';

        loadMapToDraw("1", serviceUrl, strCommuneCode);
        window.onload = function () {
            headers['VerificationToken'] = '@GetAntiForgeryToken()';
        }

        $('#close1').click(function () {
            $('#areaInfoShow').hide();
        });

    });
    @functions{
        public string GetAntiForgeryToken()
        {
            string cookieToken, formToken;
            AntiForgery.GetTokens(null, out cookieToken, out formToken);
            return cookieToken + "," + formToken;
        }
    }

</script>

<div class="full-height-content">
    <div class="full-height-content-body" style="overflow:hidden;">
        <div id='map' class="map_content">
        </div>

        <div class="list-group" style="margin-top: 180px; clear: left; z-index: 1000; position: absolute; width:180px;">
            <span class="list-group-item" style="background-color: #20AAAD; color: #ffffff">
                <b>  Thời gian tìm kiếm</b>
            </span>
            <a class="list-group-item">
                <div class="Row">
                    <div class="Cell lbl_row lbl_align">
                        <h5> @Html.Label("Thời gian bắt đầu: ")</h5>
                    </div>
                    <div class="Cell txt_row ">
                        @Html.TextBox("START_DATE", null, new { @class = "form-control  input-sm", style = "width:100%;" })
                        <span id="startDateError"></span>
                    </div>
                </div>
                <div class="Row">
                    <div class="Cell lbl_row lbl_align">
                        <h5> @Html.Label("Thời gian kết thúc: ")</h5>
                    </div>
                    <div class="Cell txt_row ">
                        @Html.TextBox("END_DATE", null, new { @class = "form-control  input-sm", style = "width:100%;" })
                        <span id="endDateError"></span>
                    </div>
                </div>
            </a>
        </div>

        <div class="list-group" id="view-level-control" style=" width: 180px; position: absolute; clear: left; z-index: 1000; ">
            <span class="list-group-item" style="background-color: #20AAAD; color: #ffffff;">
                <b> Cấp hành chính </b>
            </span>
            <ul style="padding: 0px; width: 180px;">
                <li id="click1" class="list-group-item">
                    <a accesskey="1" title="TrungUong">
                        <i class="fa fa-comment-o"></i> Tỉnh/Thành Phố
                    </a>
                </li>
                <li id="click2" class="list-group-item">
                    <a accesskey="2" title="TinhThanh">
                        <i class="fa fa-search"></i> Quận/Huyện
                    </a>
                </li>
                <li id="click3" class="list-group-item">
                    <a accesskey="3" title="QuanHuyen">
                        <i class="fa fa-user"></i> Xã/Phường
                    </a>
                </li>
            </ul>
        </div>

        <div id="areaInfoShow" class="modal-dialog" style="display: none; min-width: 200px; max-width: 300px; position: absolute; z-index: 1000; margin-left:200px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="close1" class="bootbox-close-button close" aria-hidden="true" data-dismiss="modal" type="button">×</button>
                    <h4 class="modal-title" style="text-align:center;">Thống kê mật độ dân số</h4>
                </div>
                <div class="modal-body">
                    <div id="areaInfo" class="bootbox-body">
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
